1. Technical Field
The present invention is related to data encoding, more specifically to data encoding executed in an imaging device.
2. Description of the Related Art
By mounting a small or thin imaging device on a small or thin portable terminal, such as a portable phone or a PDA personal digital assistant), the portable terminal can now function as an imaging device also. Thanks to this new development, the portable terminal, such as the portable phone, can send not only audio information but also visual information. The imaging device has been also mounted on a portable terminal such as the MP3 player, besides the portable phone and PDA. As a result, a variety of portable terminals can now function as an imaging device, capturing an external image and retaining the image as electronic data.
Generally, the imaging device uses a solid state imaging device such as a CCD (charge-couple device) image sensor or a CMOS (complementary metal-oxide semiconductor) image sensor.
FIG. 1 is a simplified structure of a typical imaging device, and FIG. 2 shows the steps of a typical JPEG encoding process. FIG. 3 shows signal types of a related image signal processor (ISP) for outputting encoded data.
As shown in FIG. 1, the imaging device, converting the captured external image to electronic data and displaying the image on a display unit 150, comprises an image sensor 110, an image signal processor (ISP) 120, a back-end chip 130, a baseband chip 140 and a display unit 150. The imaging device can further comprise a memory, for storing the converted electronic data, and an AD converter, converting an analog signal to a digital signal.
The image sensor 110 has a Bayer pattern and outputs an electrical signal, corresponding to the amount of light inputted through a lens, per unit pixel.
The image signal processor 120 converts raw data inputted from the image sensor 110 to a YUV value and outputs the converted YUV value to the back-end chip. Based on the fact that the human eye reacts more sensitively to luminance than to chrominance, the YUV method divides a color into a Y component, which is luminance, and U and V components, which are chrominance. Since the Y component is more sensitive to errors, more bits are coded in the Y component than in the U and V components. A typical Y:U:V ratio is 4:2:2.
By sequentially storing the converted YUV value in FIFO, the image signal processor 120 allows the back-end chip 130 to receive corresponding information.
The back-end chip 130 converts the inputted YUV value to JPEG or BMP through a predetermined encoding method and stores the YUV value in a memory, or decodes the encoded image, stored in the memory, to display on the display unit 150. The back-end chip 130 can also enlarge, reduce or rotate the image. Of course, it is possible, as shown in FIG. 1, that the baseband chip 140 can also receive from the back-end chip 130, and display on the display unit 150, the decoded data.
The baseband chip 140 controls the general operation of the imaging device. For example, once a command to capture an image is received from a user through a key input unit (not shown), the baseband chip 140 can make the back-end chip 130 generate encoded data corresponding to the inputted external image by sending an image generation command to the back-end chip 130.
The display unit 150 displays the decoded data, provided by the control of the back-end chip 130 or the baseband chip 140.
FIG. 2 illustrates the steps of typical JPEG encoding, carried out by the back-end chip 130. Since the JPEG encoding process 200 is well-known to those of ordinary skill in the art only a brief description will be provided here.
As illustrated in FIG. 2, the image of the inputted YUV values is divided into a block in the size of 8×8 pixels, and in a step represented by 210, DCT (discrete cosine transform) is performed for each block. The pixel value, which is inputted as an 8-bit integer of between −129 and 127, is transformed to a value between −1024 and 1023 by DCT.
Then, in a step represented by 220, a quantizer quantizes a DCT coefficient of each block by applying a weighted value according to the effect on the visual. A table of this weighted value is called a “quantization table.” A quantization table value takes a small value near the DC and a high value at a high frequency, keeping the data loss low near the DC and compressing more data at a high frequency.
Then, in a step represented by 230, the final compressed data is generated by an entropy encoder, which is a lossless coder.
The data encoded through the above steps is stored in a memory. The back-end chip decodes the data loaded in the memory and displays the data on the display unit 150.
Signal types during the steps of sequentially inputting the data, stored in the memory, to process, for example, decoding are shown in FIG. 3. Generally, the back-end chip 130 is realized to receive the YUV/Bayer-format data, and the P_CLK, V_sync, H_fREF and DATA signals are used as the interface for receiving this kind of data.
As shown in FIG. 3, the conventional back-end chip 130 maintains the output state of the clock signal (P_CLK) to an “On” state throughout the process of transferring the encoded data to a following element (e.g. a decoding unit), and thus the back-end chip 130 has to carry out an operation for interfacing with the following element while invalid data (e.g. data including 0x00) is inputted.
As a result, the back-end chip 130 of the conventional imaging device consumed unnecessary electric power by carrying out an unnecessary operation.
Moreover, as shown in FIG. 3, the conventional image signal processor 120 may output a new vertical synchronous signal (V_sync2) to the back-end chip 130 although the encoding process on the frame that is currently being processed is not completed.
In this case, the back-end chip 130 sometimes processes not only the frame that is currently being processed but also the next frame, not completing the input and/or process of correct data.